<p>angular-day4 works!</p>
<form [formGroup]="valiDataForm">
    <label>
        账号：
        <input required type="text" formControlName="username">
    </label>
    <br>
    <!-- method one: -->
    <p *ngIf="valiDataForm.get('username')?.errors?.['required']">请输入账号</p>
    <!-- method two: -->
    <p>{{valiDataForm.get('username')?.errors?.["required"]?'请输入账号' : ""}}</p>
    <p *ngIf="valiDataForm.get('username')?.errors?.['minlength']?.['requiredLength']
    || valiDataForm.get('username')?.errors?.['maxlength']?.['requiredLength']">账号长度在6--18位之间</p>
    <br>
    <label>
        密码：
        <input type="text" formControlName="password">
        <p *ngIf="valiDataForm.get('password')?.errors?.['msg']">{{valiDataForm.get('password')?.errors?.['msg']}}</p>
    </label>
    <br>
    <label>
        手机号：
        <input type="text" formControlName="phone">
        <p *ngIf="valiDataForm.get('phone')?.errors?.['desc']">{{this.GetActualPhoneErrorMsg()}}</p>
    </label>
    <br>
    <button class="button" (click)="subvaliDataFormFun()">提交</button>
</form>
